﻿package plugin.duanzao.component
{
    import morn.core.components.*;

    public class QhaddItem extends Component
    {
        private var _txt1:Label;
        private var _txt2:Label;
        private var img:Image;

        public function QhaddItem(param1:String, param2:String, param3:int)
        {
            this.img = new Image();
            this.img.url = "png.common.unupp";
            this.img.x = 125;
            this.img.y = 2;
            this.addChild(this.img);
            var _loc_4:* = new Image();
            new Image().url = "png.common.tipssign";
            _loc_4.y = 3;
            this.addChild(_loc_4);
            this._txt1 = new Label();
            this._txt1.color = 12154699;
            this._txt1.stroke = "0x0";
            this._txt1.align = "left";
            this._txt1.isHtml = true;
            this._txt1.width = 120;
            this._txt1.x = 12;
            this.addChild(this._txt1);
            this._txt2 = new Label();
            this._txt2.color = 16769403;
            this._txt2.stroke = "0x0";
            this._txt2.align = "left";
            this._txt2.x = 135;
            this._txt2.width = 70;
            this._txt1.text = param1 + "<font color=\'#ffe17b\'>" + param2 + "</font>";
            if (param3 > 0)
            {
                this._txt2.text = "+" + param3;
                this.img.visible = true;
            }
            else
            {
                this._txt2.text = "";
                this.img.visible = false;
            }
            this.addChild(this._txt2);
            return;
        }// end function

        public function show(param1:String, param2:String, param3:int) : void
        {
            this._txt1.text = param1 + "<font color=\'#ffe17b\'>" + param2 + "</font>";
            if (param3 > 0)
            {
                this._txt2.text = "+" + param3;
                this.img.visible = true;
            }
            else
            {
                this._txt2.text = "";
                this.img.visible = false;
            }
            return;
        }// end function

    }
}
